#ifndef GENLAMPLABEL_H
#define GENLAMPLABEL_H

#include <QLabel>

class GenLampLabel : public QLabel
{
public:
    GenLampLabel(QWidget *parent = 0);

public slots:
    void setGray() { mode = 0; drawLamp(); }
    void setYellow() { mode = 1; drawLamp(); }
    void setGreen() { mode = 2; drawLamp(); }
    void setRed() { mode = 3; drawLamp(); }

private:
    void drawLamp();

    // 0: gray, 1: yellow, 2: green, 3: red
    int mode;
};

#endif // GENLAMPLABEL_H
